<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<s:include value="../header.jsp"></s:include>
<s:include value="../leftNav.jsp"></s:include>

<div id="content">

<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Dashboard</a></li>
	</ul>
	<div id="tabs-1">
		Welcome
		<sec:authentication property="principal.username" />
		! <br />

		<s:url id="logout" value="j_spring_security_logout"></s:url>
		<br />
		<s:a href="%{logout}">Logout</s:a>


		<s:url id="listUser" value="listAllUsers.action">
		</s:url>
		<s:a href="%{listUser}" cssClass="ui-button">List all users</s:a>
		<br />


		<s:url id="listProjects" value="listAllProjects.action">
		</s:url>
		<s:a href="%{listProjects}" cssClass="ui-button">List all projects</s:a>
		<br />


		<s:url id="listMeetings" value="listAllMeetings.action">
		</s:url>
		<s:a href="%{listMeetings}" cssClass="ui-button">List all meetings</s:a>
		<br />
		
		<s:url id="addMeeting" value="addMeetingForm.action">
			<s:param name="returnInputMeetigForm" value="true"/>
		</s:url><s:a href="%{addMeeting}">Add new meeting</s:a>


		<s:url id="listIssues" value="listAllIssues.action">
		</s:url>
		<s:a href="%{listIssues}" cssClass="ui-button">List all issues</s:a>
		<br /> <br /> <br />
		<div>
			your meetings list:
			<s:if test="meetings.size > 0">
				<table id="meetings">
					<s:iterator value="meetings">
						<tr>
							<td><s:property value="title" />
							</td>
							<td><s:property value="description" />
							</td>
						</tr>
					</s:iterator>
				</table>
			</s:if>
			<s:else>
		You dont have meetings for today.
	</s:else>

		</div>


		<sec:authorize access="hasRole('ROLE_ADMIN')">
			<!-- pozniej zmienic na PM -->

part visible only to ROLE_ADMIN user

</sec:authorize>
	</div>
</div>



</body>
</html>